package com.qiangzhi.pojo.dto;

import com.qiangzhi.annotation.Account;
import com.qiangzhi.annotation.File;
import com.qiangzhi.annotation.StringField;
import com.qiangzhi.constant.ValidMessageConstant;
import com.qiangzhi.enums.FileType;
import com.qiangzhi.enums.StringFieldType;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;

@Data
public class UserInfoDTO implements Serializable {

    private static final long serialVersionUID = 10002L;

    @Account
    private Long id;

    @StringField(empty = false, type = StringFieldType.IDENTIFY, message = ValidMessageConstant.IDENTIFY_FORMAT_ERROR)
    private String identify;

    @File(empty = true, type = FileType.JPG)
    private MultipartFile avatarFile;

    @StringField(empty = true, type = StringFieldType.PHONE, message = ValidMessageConstant.PHONE_FORMAT_ERROR)
    private String phone;

    @StringField(empty = true, type = StringFieldType.CARD, message = ValidMessageConstant.CARD_FORMAT_ERROR)
    private String card;

    @StringField(empty = true, type = StringFieldType.ADDRESS, message = ValidMessageConstant.ADDRESS_FORMAT_ERROR)
    private String address;

}
